import request from '@/util/request'

// check referrer
export function checkReferrer(data) {
  return request({
    url: '/api/order/check-referrer',
    method: 'post',
    data
  })
}

// query account
export function getAccount(data) {
  return request({
    url: '/api/order/query-account',
    method: 'post',
    data
  })
}

// query address
export function getAddress(data) {
  return request({
    url: '/api/order/query-address',
    method: 'post',
    data
  })
}

// query product
export function getProduct(data) {
  return request({
    url: '/api/order/query-product',
    method: 'post',
    data
  })
}

// is remote address
export function isRemoteCity(data) {
  return request({
    url: '/api/order/is-remote-city',
    method: 'post',
    data
  })
}

// -----------------------------------------------------------------

// create order
export function createOrder(data) {
  return request({
    url: '/api/order/create-order',
    method: 'post',
    data
  })
}

// -----------------------------------------------------------------

// pay amount
export function getPayAmount(data) {
  return request({
    url: '/api/order/get-amount',
    method: 'post',
    data
  })
}

// -----------------------------------------------------------------

// check group
export function checkGroup(data) {
  return request({
    url: '/api/order/check-group',
    method: 'post',
    data
  })
}

// check second kill
export function checkSecondKill(data) {
  return request({
    url: '/api/order/check-second-kill',
    method: 'post',
    data
  })
}

// -----------------------------------------------------------------

// get offline image list
export function getOffline(data) {
  return request({
    url: '/api/upload/get-list',
    method: 'post',
    data
  })
}

// delete offline
export function removeOffline(data) {
  return request({
    url: '/api/upload/remove-image',
    method: 'post',
    data
  })
}
